/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.ohyessoftware.sigc.infra.negocio;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Diego
 * 01/06/2011
 */
@Entity
@Table(name = "forma_pagamento", schema = "sigc")
public class FormaPagamento implements Serializable{
    private static final long serialVersionUID = 1L;


    //atributos
    /******************************************************************************/
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "cod_forma_pagamento")
    private Long codFormaPagamento;

    @Column(name = "nome")
    private String formaPagamento;

    //relacoes
    /******************************************************************************/
    @OneToMany(mappedBy = "forma_pagamento", fetch = FetchType.LAZY)
    private List<PedidoVenda> pedidoVendas;

    //get e set
    /******************************************************************************/
    public Long getCodFormaPagamento() {
        return codFormaPagamento;
    }

    public void setCodFormaPagamento(Long codFormaPagamento) {
        this.codFormaPagamento = codFormaPagamento;
    }

    public String getFormaPagamento() {
        return formaPagamento;
    }

    public void setFormaPagamento(String formaPagamento) {
        this.formaPagamento = formaPagamento;
    }

    public List<PedidoVenda> getPedidoVsndas() {
        return pedidoVendas;
    }

    public void setPedidoVsndas(List<PedidoVenda> pedidoVsndas) {
        this.pedidoVendas = pedidoVsndas;
    }
}
